package com.Ajava1704.for设计模式.for原型模式;

import java.io.IOException;

/**
 * 作者: LCG
 * 日期: 2020/2/14 10:34
 * 描述:
 */
public class ForTest004 {

    public static void main(String[] args) throws CloneNotSupportedException, IOException, ClassNotFoundException {

        ForYuanXing forYuanXing=new ForYuanXing();

        forYuanXing.setUsernam("88888");

        /*ForYuanXing clone = forYuanXing.clone();

        System.out.println(clone.getUsernam()==forYuanXing.getUsernam());
*/

        ForYuanXing forYuanXing1 = forYuanXing.deepClone();
        System.out.println(forYuanXing1.getUsernam());
        System.out.println(forYuanXing.getUsernam()==forYuanXing1.getUsernam());

    }

}
